package com.healthcloud.service.impl;

import com.healthcloud.dao.losewisdom.LoseWisdomBarthelAdlDao;
import com.healthcloud.dto.req.losewisdom.LoseWisdomListReq;
import com.healthcloud.entity.losewisdom.LoseWisdomBarthelAdlEntity;
import com.healthcloud.service.losewisdom.LoseWisdomBarthelAdlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;


@Service("loseWisdomBarthelAdlService")
@Transactional(rollbackFor = Exception.class)
public class LoseWisdomBarthelAdlServiceImpl implements LoseWisdomBarthelAdlService {

	@Autowired
	private LoseWisdomBarthelAdlDao loseWisdomBarthelAdlDao;
	
	@Override
	public LoseWisdomBarthelAdlEntity queryObject(Integer id){
		return loseWisdomBarthelAdlDao.queryObject(id);
	}
	
	@Override
	public List<LoseWisdomBarthelAdlEntity> queryList(LoseWisdomListReq bean, PageParam pageParam){
		return loseWisdomBarthelAdlDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(LoseWisdomListReq bean){
		return loseWisdomBarthelAdlDao.queryTotal(bean);
	}
	
	@Override
	public void save(LoseWisdomBarthelAdlEntity loseWisdomBarthelAdl){
		loseWisdomBarthelAdl.setCreateTime(new Date());
		loseWisdomBarthelAdlDao.save(loseWisdomBarthelAdl);
	}
	
	@Override
	public void update(LoseWisdomBarthelAdlEntity loseWisdomBarthelAdl){
		loseWisdomBarthelAdl.setUpdateTime(new Date());
		loseWisdomBarthelAdlDao.update(loseWisdomBarthelAdl);
	}
	
	@Override
	public void delete(Integer id){
		loseWisdomBarthelAdlDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		loseWisdomBarthelAdlDao.deleteBatch(ids);
	}
	
}
